package cn.tedu.tmall.admin.content.dao.search.impl;

import cn.tedu.tmall.admin.content.dao.search.ArticleElasticsearchRepository;
import cn.tedu.tmall.admin.content.dao.search.IArticleSearchRepository;
import cn.tedu.tmall.common.pojo.po.ArticleSearchPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ArticleSearchRepositoryImpl implements IArticleSearchRepository {

    @Autowired
    private ArticleElasticsearchRepository articleElasticsearchRepository;

    @Override
    public void saveALl(List<ArticleSearchPO> articleList) {
        articleElasticsearchRepository.saveAll(articleList);
    }

    @Override
    public void deleteAll() {
        articleElasticsearchRepository.deleteAll();
    }
}
